package com.yeyks.dal.dao;

import com.yeyks.dal.domain.DocInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DocInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(DocInfo record);

    DocInfo selectByPrimaryKey(Integer id);

    List<DocInfo> selectAll();

    int updateByPrimaryKey(DocInfo record);

    int insertReturnId(DocInfo record);

    List<Map> selectByDirectorKeyword(@Param("directory") Boolean directory, @Param("keyword") String keyword,
                                      @Param("offset") Integer offset, @Param("maxrow") Integer maxrow);

    List<Map> selectByParentKeyword(@Param("parent") Integer parent, @Param("keyword") String keyword,
                                    @Param("offset") Integer offset, @Param("maxrow") Integer maxrow);

    int selectByDirectorKeywordCount(@Param("directory") Boolean directory, @Param("keyword") String keyword);

    int selectByParentKeywordCount(@Param("parent") Integer parent, @Param("keyword") String keyword);

    List<DocInfo> selectByCaption(@Param("caption") String caption);

    int deleteById(@Param("id") Integer id);

    int updateCaptionContent(DocInfo record);
}